home *** CD-ROM | disk | FTP | other *** search
/ Team Palmtops 7 / Palmtops_numero07.iso / WinCE / SDKWindowsCE / HandHeldPCPro30 / sdk.exe / Jupiter SDK / data1.cab / Emulation_Include_Files / wis.idl < prev    next >
Encoding:
Text File  |  1999-02-19  |  25.0 KB  |  702 lines

  1. /*******************************************************************
  2.  
  3.     This file defines a number of structures that are common across
  4.     interfaces.
  5.  
  6.     IWISModuleInfomation
  7.  
  8. [Owner:]
  9.  
  10.     donk
  11.  
  12. Description:
  13.  
  14.     Defines the interface used to access the component information.
  15.  
  16. ********************************************************************/
  17. import "unknwn.idl";
  18. cpp_quote("#include <WinCrypt.h>")
  19. cpp_quote("#include <rio.h>")
  20.  
  21. /*-----------------------------------------------------------------
  22.  
  23. Interface:
  24.  
  25.     IRouteList
  26.  
  27. Description:
  28.  
  29.     This is the psudo-COM interface for the Active Air wireless
  30.     routing list control.  While it includes IUnknown this interface
  31.     is stubed and will return errors if used.
  32.     It is created and owned by the system router and a pointer to
  33.     its V-Table is passes to the translator components in the MSG
  34.     struct.
  35.  
  36. -------------------------------------------------------------------*/
  37.  
  38. #ifndef IROUTELIST_DEFINED
  39. #define IROUTELIST_DEFINED
  40.  
  41. // This set of structures holds the basic routing information.
  42. typedef enum RouteDir_e
  43. {
  44.     DIR_RECEIVE,
  45.     DIR_TRANSMIT
  46. } ROUTEDIR_E;
  47.  
  48. typedef struct _route_node ROUTE_NODE;
  49. typedef ROUTE_NODE* LPROUTE_NODE;
  50. struct _route_node
  51. {
  52.     DWORD           dwTagLen;
  53.     BYTE*           pTag;
  54.     LPVOID          pInterface;
  55.     LPCLSID         pClsid;
  56.     LPIID           pIid;
  57.     LPROUTE_NODE    pNext;
  58.     LPROUTE_NODE    pPrev;
  59. };
  60.  
  61. typedef struct _route_list
  62. {
  63.     DWORD           dwNumTags;
  64.     LPROUTE_NODE    pHeadRL;
  65.     LPROUTE_NODE    pCurRL;
  66.     ROUTEDIR_E      Dir;
  67. } ROUTE_LIST, *LPROUTE_LIST;
  68. typedef const ROUTE_LIST *LPCROUTE_LIST;
  69.  
  70. [
  71.     local,
  72.     uuid( DAB64DA0-9C27-11d1-AC28-00C04FCCAF8B ),
  73.     helpstring( "WIS IRouteList interface" ),
  74.     pointer_default( unique )
  75. ]
  76. interface IRouteList : IUnknown
  77. {
  78.     DWORD   GetRL_Length( void );
  79.     DWORD   GetRL([in,out] BYTE* pTagList,
  80.                   [in] DWORD dwSize);
  81.     DWORD   SetRL( [in] BYTE* pTagList );
  82.     HRESULT CompairCurrentTag( [in] BYTE* pTag );
  83.  
  84.     HRESULT Head( void );
  85.     HRESULT Next( void );
  86.     HRESULT Prev( void );
  87.     HRESULT Tail( void );
  88.     HRESULT Prepend( [in] BYTE* lpTag );
  89.     HRESULT Append( [in] BYTE* lpTag );
  90.     HRESULT InsertBefore( [in] BYTE* lpTag);
  91.     HRESULT InsertAfter([in] BYTE* lpTag);
  92.  
  93.     // Functions to remove items from the list
  94.     HRESULT RemoveCur( void );
  95.     HRESULT RemoveAll( void );
  96.     HRESULT RemoveHead( void );
  97.     HRESULT RemoveTail( void );
  98.  
  99.  
  100.     // Initialize functions
  101.     // Assertions
  102.     // One of the following is true
  103.     //    CLSID  && IID are good
  104.     //    TAG and IID are good
  105.     //    TAG is good and the IID == IID_ITranslator
  106.     //    CLSID is good and the IID == IID_ITranslator
  107.     HRESULT Initialize( void );
  108.     HRESULT InitializeCur( void );
  109. }
  110.  
  111. #endif // IROUTELIST_DEFINED
  112.  
  113.  
  114. /*-----------------------------------------------------------------
  115.  
  116. Interface:
  117.  
  118.     IWSEventLog
  119.  
  120. Description:
  121.  
  122.     This is the psudo-COM interface for the Active Air wireless
  123.     event logging.  While it includes IUnknown this interface
  124.     is stubed and will return errors if used.
  125.     It is created and owned by the system router and a pointer to
  126.     its V-Table is passes to the translator components in the MSG
  127.     struct.
  128.  
  129. -------------------------------------------------------------------*/
  130.  
  131. #ifndef WSEVENTLOG_DEFINED
  132. #define WSEVENTLOG_DEFINED
  133.  
  134. [
  135.     local,
  136.     uuid( 31B2B920-EB78-11d1-8005-0000F803FFBE ),
  137.     helpstring( "WIS IWSEventLog interface" ),
  138.     pointer_default( unique )
  139. ]
  140.  
  141. interface IWSEventLog : IUnknown
  142. {
  143.         BOOL WriteEventLog (
  144.             [in] LPCWSTR lpwszSource,                // "Source" Property
  145.             [in] LPCWSTR lpwszEvent,                 // "Event" Property
  146.             [in] LPCWSTR lpwszData                   // "Data" Property
  147.             );
  148.         void    ShowLastError ([in] LPCTSTR lpszRoutine, [in] LPCTSTR lpszCallName);
  149. }
  150.  
  151. #endif // WSEVENTLOG_DEFINED
  152.  
  153. /*-----------------------------------------------------------------
  154.  
  155. Interface:
  156.  
  157.     IWisTypes
  158.  
  159. Description:
  160.  
  161. This set of structures and types are defined for the WIS enviroment.
  162. -------------------------------------------------------------------*/
  163.  
  164. #ifndef WIS_DEFINED
  165. #define WIS_DEFINED
  166.  
  167. cpp_quote("#define MAX_SOCKET_DATA_LEN 1024")
  168. cpp_quote("#define ROUTER_PORT 0xAA0")
  169.  
  170. [ uuid(DAB64DA1-9C27-11d1-AC28-00C04FCCAF8B),
  171.   version(0.1), pointer_default(unique) ]
  172.  
  173. interface IWisTypes
  174. {
  175.  
  176. typedef struct _socketinfo {
  177.     BYTE ChannelNameLen;
  178.     BYTE Source;
  179.     DWORD Id;
  180. } SOCKETINFO, *LPSOCKETINFO;
  181.  
  182. // These define the basic message sources
  183. cpp_quote("#define WIS_SOURCE_UNKNOWN  0")
  184. cpp_quote("#define WIS_SOURCE_RADIO    1")
  185. cpp_quote("#define WIS_SOURCE_DESKTOP  2")
  186. cpp_quote("#define WIS_SOURCE_MODEM    3")
  187. cpp_quote("#define WIS_SOURCE_IR       4")
  188.  
  189. // This structure is used to define the current transmitter
  190. // settings.
  191. cpp_quote("#define WIS_XMIT_PACKET_REPEAT  0x00000001")
  192. cpp_quote("#define WIS_NO_UID_IF_NO_PACKAGING_NEEDED  0x00000002")
  193.  
  194. typedef struct _xmitinfo {
  195.     DWORD cbSize;               // Holds the size of this struct
  196.     DWORD cmInterval;           // Interval time in minutes.
  197.     DWORD cbMaxPerInterval;     // Defines the maximum bytes that can be sent
  198.                                 // in the given interval.
  199.     DWORD cbMaxBlock;           // Maximum block size.
  200.     DWORD csInterBlockGap;      // Sets the inter-packet gap in seconds
  201.                                 // This regulates the rate at which the
  202.                                 // system will send pages.
  203.     DWORD csInterMessageGap;    // Set the inter-message gap in seconds
  204.                                 // This regulates the rate at which the
  205.                                 // system sends full messages.
  206.     DWORD fSettings;            // Settings flags for the transmissions
  207.     DWORD dwRepeatCount;        // xmit repeat count.
  208.  
  209. } XMITINFO, *LPXMITINFO;
  210.  
  211. // This structure is used to define the current data feed in the WIS
  212. // and may be used on the device when two way comm is implemented.
  213.  
  214. // Defines for the dwFlags member of _chaninfo
  215. cpp_quote("#define WIS_ACQUIRE   0x00000001")
  216. cpp_quote("#define WIS_TRANSMIT  0x00000002")
  217. cpp_quote("#define WIS_BULK         0x00000004")
  218.  
  219. typedef struct _chaninfo {
  220.     DWORD   cbSize;             // Holds the size of this struct
  221.     HWND    hParent;            // Holds the parent window.
  222.     LPCWSTR szDataFeedId;       // The name of the datafeed id
  223.     BYTE    GroupCode;          // Holds the one byte group code.
  224.     LPCWSTR szBaseConfigKey;    // The path to the base configuration key
  225.     LPCWSTR szXmitBufferPath;   // Holds the path to the current xmit buffer
  226.     LPCWSTR szOrignalName;      // Holds the orignal data URL or file name
  227.     DWORD   dwOrignalSize;      // Holds the size of the orignal data
  228.     DWORD    dwFlags;            // Holds the flags for the channel
  229.     HANDLE    hShutdownEvent;        // Event handle for shutdown notification
  230.                                 // (Set for shutdown)
  231.     HANDLE    hPauseEvent;        // Event handle for pause notification
  232.                                 // (Reset for pause)
  233.  
  234.     XMITINFO Xmit;              // Xmit info struct for the transmitter to be
  235.                                 // used for the current data feed.
  236.  
  237. } CHANINFO, *LPCHANINFO;
  238.  
  239. // this structure is used to pass additional information about the message
  240. typedef struct _xtramsginfo  {
  241.     DWORD           cbSize;         // This structures size
  242.     BYTE            MsgType;
  243.     BYTE            MsgPriority;
  244.     BYTE            MsgFlags;
  245.     BYTE            NumParts;
  246.     WORD            wErrorFlags;
  247.     WORD            wMsgSequenceNumber;
  248. } XTRAMSGINFO, *LPXTRAMSGINFO;
  249.  
  250. // This structure is used to pass the basic routing information along
  251. // to the translator interfaces.
  252. typedef struct _msginfo
  253. {
  254.     DWORD           cbSize;         // This structures size
  255.     LPCWSTR         pszFileName;        // filename for the message
  256.     LPCWSTR         pszErrFileName;     // error data for the message
  257.     LPCWSTR         pszResponseFileName;// Response data for the message
  258.     LPCWSTR         pszOEMFileName;     // OEM data for the message
  259.     LPCWSTR         pszFolderName; // Holds the channel name (CDF name)
  260.     LPCWSTR         pszChannelName; // Holds the channel name (CDF name)
  261.     LPCWSTR         pszId;          // Holds the file id (CDF ID)
  262.     BYTE            AddressTagLen;  // Defines the length of the Address Tag
  263.     BYTE*           pAddressTag;    // Points to the Address Tag
  264.     BYTE            GroupTagLen;    // Defines the length of the Group Tag
  265.     BYTE*           pGroupTag;      // Points to the Group Tag
  266.     BYTE            FilterLen;    // Defines the length of the Group Tag
  267.     BYTE*           pFilterBytes;      // Points to the Group Tag
  268.     LPCROUTE_LIST   pRL;            // Defines the current route list
  269.     IRouteList*     pRLControl;     // The interface used to control the routing list
  270.     BYTE            Source;         // Defines the message source
  271.     BYTE            Device;         // Defines the device that recieved the message
  272.     SYSTEMTIME      DateTime;       // Date/time that the message is RX'ed
  273.     LPROUTE_NODE    pReceiver;      // Points to the receiver
  274.     LPROUTE_NODE    pPackager;      // Points to the packager to use
  275.     LPROUTE_NODE    pXmitter;       // Points to the transmitter to use
  276.     DWORD           dwReturnAddressInfoLen;// The length of the return address
  277.     LPVOID          pReturnAddressInfo;    // Return address information
  278.     LPCHANINFO      lpChan;                 // Points to info used in transmission.)
  279.     IWSEventLog*    pWSEventLog;            // The interface used to write event logs
  280.     XTRAMSGINFO*    pXtraMsgInfo;           // Additional info about this message
  281. } MSGINFO, *LPMSGINFO;
  282.  
  283.  
  284. // **Start of Crypto stuff
  285. // Defaults for the crypto functions.
  286. cpp_quote("#define PGM_CRYPTO_PROVIDER     (PROV_RSA_FULL)")     // for CryptAcquireContext
  287. cpp_quote("#define PGM_CRYPTO_HASH_ALGID   (CALG_SHA)")          // Hash algorithm, for CryptCreateHash
  288. cpp_quote("#define PGM_CRYPTO_HASH_FLAGS   (0)")                 // for CryptCreateHash
  289. cpp_quote("#define PGM_CRYPTO_ALG_ID       (CALG_RC4)")          // Crypto algorithm, for CryptDeriveKey
  290. cpp_quote("#define PGM_CRYPTO_FLAGS        (CRYPT_EXPORTABLE)")  // for CryptDeriveKey
  291.  
  292. cpp_quote("#define PGM_CRYPTO_OPTIONS_USE_DEFAULTS     0x0000")  // use default crypto options (see above)
  293. cpp_quote("#define PGM_CRYPTO_OPTIONS_USE_GIVEN        0x0001")  // use crypto options provided in pPgm parameter of
  294.                                                     // PgmEncryptAndSignPgmData() function
  295.  
  296. // support routines
  297. cpp_quote("void DwordToNetworkOrder(BYTE *pbDest, DWORD dwSrc);")
  298. cpp_quote("void NetworkOrderToDword(DWORD *pdwDest, BYTE *pbSrc);")
  299. cpp_quote("void WordToNetworkOrder(BYTE *pbDest, WORD wSrc);")
  300. cpp_quote("void NetworkOrderToWord(WORD *pwDest, BYTE *pbSrc);")
  301.  
  302. //*************************************************************************
  303. // Generic routines to sign/derive keys for encryption
  304. //*************************************************************************
  305. //      PgmSignBlob() - returns signature the blob
  306. //      PgmGetCryptKey() - returns handle to the derived crypto key
  307. //*************************************************************************
  308.  
  309.  
  310. //**--
  311. // returns signature of the input blob (pbBlob) in the output buffer (pbSignature)
  312. // if pbSignature is NULL, it returns its length
  313. // Return value is TRUE (success) or FALSE (fail)
  314. cpp_quote("HRESULT PgmSignBlob(")
  315. cpp_quote("    LPBYTE pbBaseKey,")       // in - Base key
  316. cpp_quote("    DWORD  dwBaseKeyLen,")    // in - Base key len
  317. cpp_quote("    LPBYTE pbUniqueData,")    // in - message specific unique data
  318. cpp_quote("    DWORD dwUniqueDataLen,")  // in - message specific unique data len
  319. cpp_quote("    LPBYTE pbBlob,")          // in - message to be signed and encrypted
  320. cpp_quote("    DWORD dwBlobLen,")        // in - length of the message
  321. cpp_quote("    HCRYPTPROV hCryptoProv,") // in - handle to the crypto provider
  322. cpp_quote("    DWORD dwHashAlgId,")      // in - AlgId, CALG_SHA etc.
  323. cpp_quote("    DWORD dwHashFlags,")      // in - flags for CryptCreateHash
  324. cpp_quote("    LPBYTE pbSignature,")     // out - signaure
  325. cpp_quote("    DWORD dwMaxSignatureSize,")  // in - size of signature buffer
  326. cpp_quote("    DWORD *pdwActualBytesWritten")    // out - number of bytes copied in pbSignature
  327. cpp_quote("    );")
  328.  
  329. //**--
  330. // Derives an encryption key based on the unique data and base key
  331. cpp_quote("HCRYPTKEY PgmGetCryptKey (")
  332. cpp_quote("    LPBYTE pbBaseKey,")       // in - Base key
  333. cpp_quote("    DWORD  dwBaseKeyLen,")    // in - Base key len
  334. cpp_quote("    LPBYTE pbUniqueData,")    // in - message specific unique data
  335. cpp_quote("    DWORD dwUniqueDataLen,")   // in - message specific unique data len
  336. cpp_quote("    HCRYPTPROV hCryptoProv,") // in - handle to the crypto provider
  337. cpp_quote("    DWORD dwHashAlgId,")      // in - AlgId, CALG_SHA etc.
  338. cpp_quote("    DWORD dwHashFlags,")      // in - flags for CryptCreateHash
  339. cpp_quote("    DWORD dwCryptoAlgId,")    // in - AlgId, CALG_RC4 etc.
  340. cpp_quote("    DWORD dwCryptoFlags")     // in - CRYPT_EXPORTABLE etc.
  341. cpp_quote("    );")
  342.  
  343. //*************************************************************************
  344. //      ** Radio Programming support **
  345. //*************************************************************************
  346. // specific to our way of signing, encrypting, and serializing a programming blob
  347. //      PgmEncryptAndSignBlob() - Encrypts, signs, and serializes a blob
  348. //      PgmVerifyAndDecryptBlob() - deserializes, decrypts, and verifies signature of a blob
  349. //*************************************************************************
  350.  
  351. //**--
  352. // Input: Msg, UniqueData
  353. // Output: UniqueDataLen+UniqueData+SignatureLen+Signature+EncryptedMsgLen+EncryptedMsg
  354. // The lengths are DWORD serialized in network order (HH,LH,HL,LL)
  355. cpp_quote("HRESULT PgmEncryptAndSignBlob(")
  356. cpp_quote("    LPBYTE pbBaseKey,")       // in - Base key
  357. cpp_quote("    DWORD  dwBaseKeyLen,")    // in - Base key len
  358. cpp_quote("    LPBYTE pbUniqueData,")    // in - message specific unique data
  359. cpp_quote("    DWORD dwUniqueDataLen,")  // in - message specific unique data len
  360. cpp_quote("    LPBYTE pbBlob,")          // in - message to be signed and encrypted
  361. cpp_quote("    DWORD dwBlobLen,")        // in - length of the message
  362. cpp_quote("    HCRYPTPROV hCryptoProv,") // in - handle to the crypto provider
  363. cpp_quote("    DWORD dwHashAlgId,")      // in - AlgId, CALG_SHA etc.
  364. cpp_quote("    DWORD dwHashFlags,")      // in - flags for CryptCreateHash
  365. cpp_quote("    DWORD dwCryptoAlgId,")    // in - AlgId, CALG_RC4 etc.
  366. cpp_quote("    DWORD dwCryptoFlags,")    // in - CRYPT_EXPORTABLE etc.
  367. cpp_quote("    LPBYTE pbOutputBlob,")    // out - signed and encrypted blob
  368. cpp_quote("    DWORD dwMaxOutputBlobSize,")  // in - size of OutputBlob buffer
  369. cpp_quote("    DWORD *pdwActualBytesWritten")    // out - number of bytes copied in the OutputBlob buffer
  370. cpp_quote("    );")
  371.  
  372. //**--
  373. // Input: UniqueDataLen+UniqueData+SignatureLen+Signature+EncryptedMsgLen+EncryptedMsg
  374. // Output: DecryptedMsg
  375. // returns TRUE if signature verified, false otherwise.
  376. // The lengths are DWORD serialized in network order (HH,LH,HL,LL)
  377. cpp_quote("HRESULT PgmVerifyAndDecryptBlob(")
  378. cpp_quote("    LPBYTE pbBaseKey,")       // in - Base key
  379. cpp_quote("    DWORD  dwBaseKeyLen,")    // in - Base key len
  380. cpp_quote("    LPBYTE pbBlob,")          // in - message to be decrypted and signature verified
  381. cpp_quote("    DWORD dwBlobLen,")        // in - length of the message
  382. cpp_quote("    HCRYPTPROV hCryptoProv,") // in - handle to the crypto provider
  383. cpp_quote("    DWORD dwHashAlgId,")      // in - AlgId, CALG_SHA etc.
  384. cpp_quote("    DWORD dwHashFlags,")      // in - flags for CryptCreateHash
  385. cpp_quote("    DWORD dwCryptoAlgId,")    // in - AlgId, CALG_RC4 etc.
  386. cpp_quote("    DWORD dwCryptoFlags,")    // in - CRYPT_EXPORTABLE etc.
  387. cpp_quote("    LPBYTE pbOutputBlob,")    // out - decrypted blob (stripped of signature etc.)
  388. cpp_quote("    DWORD dwMaxOutputBlobSize,")  // in - size of OutputBlob buffer
  389. cpp_quote("    DWORD *pdwActualBytesWritten")    // out - number of bytes copied in the OutputBlob buffer
  390. cpp_quote("    );")
  391. cpp_quote(" ")
  392.  
  393. cpp_quote("typedef struct _radio_crypt  {           ")
  394. cpp_quote("    WORD wStructSize;                    ")
  395. cpp_quote("    DWORD dwMemberValidMask;             ")
  396. cpp_quote("    HCRYPTPROV hCryptoProv;              ")
  397. cpp_quote("    DWORD dwCryptoFlags;                 ")
  398. cpp_quote("    DWORD dwCryptoAlgId;                 ")
  399. cpp_quote("    BYTE AddressTagLen;                  ")
  400. cpp_quote("    BYTE GroupTagLen;                    ")
  401. cpp_quote("    WORD wMsgSpecificDataLen;            ")
  402. cpp_quote("//  BYTE AddressTag[AddressTagLen];      ")
  403. cpp_quote("//  BYTE GroupTag[GroupTagLen];          ")
  404. cpp_quote("} RADIO_CRYPT, *LPRADIO_CRYPT;           ")
  405. cpp_quote(" ")
  406.  
  407. cpp_quote("BOOL DeriveEncryptionKey (")
  408. cpp_quote("    LPRADIO_CRYPT pSecurity,")    // IN - parameters for CryptDeriveKey() call
  409. cpp_quote("    BYTE *pbKeyValue,")           // IN - Key value to be used for key deriviation
  410. cpp_quote("    DWORD dwKeySize,")            // IN _ Number of bytes in pbKeyValue
  411. cpp_quote("    HCRYPTKEY *phKey")            // OUT - handle to the derived key
  412. cpp_quote(");")
  413.  
  414. // **End of Crypto stuff
  415.  
  416. }  // interface IWisTypes
  417. #endif  // WIS_DEFINED
  418.  
  419.  
  420. /*-----------------------------------------------------------------
  421.  
  422. Interface:
  423.  
  424.     IWISModuleInfomation
  425.  
  426. [Owner:]
  427.  
  428.     donk
  429.  
  430. Description:
  431.  
  432.     Defines the interface used to access the component information.
  433. -------------------------------------------------------------------*/
  434.  
  435. #ifndef IMODULEINFORMATION_DEFINED
  436. #define IMODULEINFORMATION_DEFINED
  437.  
  438. typedef struct _MODULE_INFO
  439. {
  440.     DWORD    dwTagSize;
  441.     BYTE*    lpTag;
  442.     LPCWSTR  szType;
  443.     LPCWSTR  szFriendlyName;
  444.     LPCWSTR  szDiscription;
  445.     LPCWSTR  szVersion;
  446.     LPCWSTR  szManufacturer;
  447. } MODULE_INFO, *LPMODULE_INFO;
  448.  
  449.  
  450. [
  451.     local,
  452.     uuid( 637AF7C0-99BC-11d1-AC28-00C04FCCAF8B ),
  453.     helpstring( "WIS IWISModuleInformation interface" ),
  454.     pointer_default( unique )
  455. ]
  456. interface IWISModuleInformation : IUnknown
  457. {
  458.     HRESULT GetInfo( LPMODULE_INFO pInfo );
  459. }
  460.  
  461. #endif // IMODULEINFORMATION_DEFINED
  462.  
  463. /*-----------------------------------------------------------------
  464.  
  465.  
  466. Interface:
  467.  
  468.     ITranslator
  469.  
  470. [Owner:]
  471.  
  472.     donk
  473.  
  474. Description:
  475.  
  476.     This is the base COM interface for the wireless Services
  477.     file translator.  It is intended that this provice a common
  478.     interface for the device and PC based apps.
  479.  
  480. -------------------------------------------------------------------*/
  481. #ifndef ITRANSLATOR_DEFINED
  482. #define ITRANSLATOR_DEFINED
  483.  
  484. cpp_quote("#define TRANS_CONTINUE           0x200")
  485. cpp_quote("#define TRANS_STOP               0x201")
  486. cpp_quote("#define TRANS_S_CONTINUE     MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, TRANS_CONTINUE) ")
  487. cpp_quote("#define TRANS_E_CONTINUE     MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, TRANS_CONTINUE) ")
  488. cpp_quote("#define TRANS_S_STOP         MAKE_HRESULT(SEVERITY_SUCCESS, FACILITY_ITF, TRANS_STOP) ")
  489. cpp_quote("#define TRANS_E_STOP         MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, TRANS_STOP) ")
  490.  
  491. cpp_quote("#define TRANS_CONTINUE_PROCESSING(hresult)  (HRESULT_CODE(hresult) == TRANS_CONTINUE)")
  492. cpp_quote("#define TRANS_STOP_PROCESSING(hresult)      (HRESULT_CODE(hresult) == TRANS_STOP)")
  493.  
  494. [
  495.     local,
  496.     uuid( CB5ACD52-FE25-11d0-AABD-00A0C90A8F90 ),
  497.     helpstring( "WIS ITranslator interface" ),
  498.     pointer_default( unique )
  499. ]
  500. interface ITranslator : IWISModuleInformation
  501. {
  502.     HRESULT ProcessMSG( [in, out] LPMSGINFO pMSG );
  503.  
  504.     HRESULT GetLastError( [in, out] LPWSTR pszError,
  505.                           [in] DWORD cbSize );
  506. };
  507.  
  508. #endif //ITRANSLATOR_DEFINED
  509.  
  510.  
  511. /*-----------------------------------------------------------------
  512.  
  513. Interface:
  514.     IAcquisition
  515.  
  516. [Owner:]
  517.  
  518.     donk
  519.  
  520. Description:
  521.  
  522.     These this file.
  523.  
  524. -------------------------------------------------------------------*/
  525. #ifndef IACQUISITION_DEFINED
  526. #define IACQUISITION_DEFINED
  527.  
  528. // There is no nore data to send on this data feed.
  529. cpp_quote("#define ACQUIS_E_NO_MORE_DATA    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x200) ")
  530. // The ID for the data feed is unknown.
  531. cpp_quote("#define ACQUIS_E_UNKNOWN_ID      MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x201) ")
  532.  
  533. [
  534.     local,
  535.     uuid( 4A092560-1E52-11d1-AACF-00A0C90A8F90 ),
  536.     helpstring( "WIS IAcquisition interface" ),
  537.     pointer_default( unique )
  538. ]
  539. interface IAcquisition : IWISModuleInformation
  540. {
  541.     HRESULT Acquire( [in, out] LPMSGINFO pMSG );
  542.  
  543.     HRESULT GetFirst( [in, out] LPMSGINFO pMSG );
  544.  
  545.     HRESULT GetNext( [in, out] LPMSGINFO pMSG );
  546.  
  547.     HRESULT GetLastError( [in, out] LPWSTR pszError,
  548.                           [in] DWORD cbSize );
  549. }
  550.  
  551. #endif // IACQUISITION_DEFINED
  552.  
  553.  
  554.  
  555. /*-----------------------------------------------------------------
  556.  
  557. Interface:
  558.  
  559.     ITransmitter
  560.  
  561. [Owner:]
  562.  
  563.     donk
  564.  
  565. Description:
  566.  
  567.     This is the base COM interface for the Wireless Information
  568.     Services (WIS) transmitter.  This interface is designed
  569.     to allow the WIS to connect to a communication channel and send
  570.     files to that channel.
  571.  
  572. -------------------------------------------------------------------*/
  573. #ifndef IXMIT_DEFINED
  574. #define IXMIT_DEFINED
  575.  
  576. // The comm connection has been lost
  577. cpp_quote("#define XMIT_E_CONNECTION_LOST   MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x200) ")
  578. // The transmitter can not connect.
  579. cpp_quote("#define XMIT_E_CANT_CONNECT      MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x201) ")
  580. // The transmitter is not connected
  581. cpp_quote("#define XMIT_E_NOT_CONNECTED MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x202)")
  582. // The transmission had errors sending the file
  583. cpp_quote("#define XMIT_E_SEND_ERROR        MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x203)")
  584. // The could not open the file for sending
  585. cpp_quote("#define XMIT_E_BAD_INPUT_FILE    MAKE_HRESULT(SEVERITY_ERROR, FACILITY_ITF, 0x204)")
  586.  
  587. [
  588.     local,
  589.     uuid( 2288A560-1E3D-11d1-AACF-00A0C90A8F90 ),
  590.     helpstring( "WIS ITransmitter interface" ),
  591.     pointer_default( unique )
  592. ]
  593. interface ITransmitter : IWISModuleInformation
  594. {
  595.     // The main interface
  596.     HRESULT MakeConnection( [in, out] LPMSGINFO pMSG );
  597.     HRESULT SendFile( [in, out] LPMSGINFO pMSG );
  598.  
  599.     HRESULT CloseConnection( [in, out] LPMSGINFO pMSG );
  600.  
  601.     HRESULT GetLastError( [in, out] LPWSTR pszError,
  602.                           [in] DWORD cbSize );
  603.  
  604.     BOOL IsConnected( );
  605.  
  606. };
  607.  
  608. #endif // IXMIT_DEFINED
  609.  
  610. /*-----------------------------------------------------------------
  611.  
  612. Interface:
  613.  
  614.     IWISAppFilter
  615.  
  616. [Owner:]
  617.  
  618.     donk
  619.  
  620. Description:
  621.  
  622.     Defines the interface used to access the application level filter
  623.     for the wireless services.
  624.  
  625. -------------------------------------------------------------------*/
  626. #ifndef IWISAPPFILTER_DEFINED
  627. #define IWISAPPFILTER_DEFINED
  628.  
  629. typedef enum _WIS_FILTER_TABLE
  630. {
  631.     WIS_FT_ACCEPT_ALL            = 0,
  632.  
  633.     WIS_FT_GENERAL_SHORT_STRING    = 1,
  634.  
  635.     WIS_FT_ACCEPT_GROUP_ONLY     = 0xFE,
  636.     WIS_FT_ACCEPT_NONE            = 0xFF,
  637. } WIS_FILTER_TABLE;
  638.  
  639.  
  640. [
  641.     local,
  642.     uuid( A38339F0-8CFF-11d1-AB4B-00A0C90A8F90 ),
  643.     helpstring( "IWISAppFilter interface" ),
  644.     pointer_default( unique )
  645. ]
  646. interface IWISAppFilter : IUnknown
  647. {
  648.     HRESULT  IsGroupTagRegistered( [in] LPWSTR szGroupTag,
  649.                                    [out] BOOL *fResult,
  650.                                    [in, out] LPDWORD pdwDevice);
  651.     HRESULT CreateFilterTable( [in, out] HANDLE *phFTable,
  652.                                [in] DWORD dwNumEntries,
  653.                                [in] WIS_FILTER_TABLE wftFilterType);
  654.     HRESULT SetHashValue( [in] HANDLE hFTable,
  655.                           [in] LPWSTR szValue);
  656.  
  657.     HRESULT SetPreferences( [in] HANDLE hFTable,
  658.                             [in] DWORD dwPreferances);
  659.  
  660.     HRESULT RegisterFilterTable( [in] HANDLE hFTable,
  661.                                  [in] LPWSTR szGroupTag,
  662.                                  [in] DWORD dwDevice);
  663.  
  664.     HRESULT DestroyFilterTable( [in] HANDLE hFTable);
  665. }
  666.  
  667. #endif // IWISAPPFILTER_DEFINED
  668.  
  669. /*-----------------------------------------------------------------
  670.  
  671. Interface:
  672.  
  673.     IPropPageUI
  674.  
  675. [Owner:]
  676.  
  677.     a-gregbo
  678.  
  679. Description:
  680.  
  681.     Defines the interface used to access any property pages for
  682.     every WIS component.
  683.  
  684. -------------------------------------------------------------------*/
  685. #ifndef IPROPPAGEUI_DEFINED
  686. #define IPROPPAGEUI_DEFINED
  687. [
  688.     local,
  689.     uuid(7B2685C1-CF11-11d1-8D4D-006097C51826),
  690.  
  691.     helpstring("IPropPageUI Interface"),
  692.     pointer_default(unique)
  693. ]
  694. interface IPropPageUI : IUnknown
  695. {
  696.     [helpstring("GetFirstPropSheetPage")] HRESULT GetFirstPropSheetPage(HANDLE * hPropSheetPage);
  697.     [helpstring("method GetNextPropSheetPage")] HRESULT GetNextPropSheetPage(HANDLE * hPropSheetPage);
  698.     [helpstring("method PutOpenRegKey")] HRESULT PutOpenRegKey(HKEY hOpenRegKey);
  699.         [helpstring("method PutTextHwnd")] HRESULT PutTextHwnd(HWND hwndText);
  700. };
  701. #endif // IPROPPAGEUI_DEFINED
  702.